<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<style>
    .el-upload__input {
        display: none !important;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sys:indeximg:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:indeximg:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">跳转链接或页面</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="indeximg.hrefurl" placeholder="跳转链接或页面"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">类型</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="indeximg.type" @keyup.enter="query" >
                                <option value="0">跳转链接</option>
                                <option value="1">跳转页面</option>
                            </select>
                        </div>
                    </div>
            <div class="col-sm-2 control-label"><span style="color: red">*</span>图片</div>
            <div class="col-sm-10">
                <el-upload
                        class="upload-demo"
                        action="https://dyc.ctolab.cn/renren-admin/renren-api/api/file/uploadfile"
                        :on-preview="handlePreview"
                        :on-remove="handleRemove"
                        :file-list="fileList1"
                        :on-success="handsuccess"
                        list-type="picture">
                    <el-button size="small" type="primary">点击上传</el-button>
                </el-upload>

                <input type="text" class="form-control" v-model="indeximg.img" style="display: none;"/>
            </div>
							            <div class="form-group" style="margin-top: 5px;">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/indeximg.js?_${.now?long}"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</body>
</html>